\documentclass[11pt]{amsart}

%\usepackage{latexsym}
%\usepackage{amsbsy}
\usepackage[all]{xy}
%\usepackage{amscd}
\usepackage{amsmath,graphicx,amsthm,mathrsfs,verbatim,ifthen,enumerate,amssymb,
setspace}
\usepackage{comment}

\onehalfspacing

\textwidth = 6.5 in \textheight = 9.3 in \oddsidemargin = 0.0 in
\evensidemargin = 0.0 in \topmargin = -0.4 in \headheight = 0.2 in
\headsep = 0.2 in
\parskip = 0.2in
\parindent = 0.1in

\theoremstyle{plain}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{claim}[theorem]{Claim}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{corollary*}[theorem]{Corollary}
\newtheorem{proposition}[theorem]{Proposition}

\theoremstyle{definition}
\newtheorem{definition}{Definition}
\newtheorem{example}[definition]{Example}
\newtheorem{exercise}[definition]{Exercise}
\newtheorem{practice*}{Practice}

\theoremstyle{remark}
\newtheorem*{remark}{Remark}

\def\d{\displaystyle}
\newcommand{\bdef}{\begin{definition}}
\newcommand{\edefi}{\end{definition}}
\newcommand{\bexa}{\begin{example}}
\newcommand{\eexa}{\end{example}}
\newcommand{\bexe}{\begin{exercise}}
\newcommand{\eexe}{\end{exercise}}
\newcommand{\benu}{\begin{enumerate}}
\newcommand{\eenu}{\end{enumerate}}
\newcommand{\bite}{\begin{itemize}}
\newcommand{\eite}{\end{itemize}}
\newcommand{\brem}{\begin{remark}}
\newcommand{\erem}{\end{remark}}
\newcommand{\Ra}{\Rightarrow}
\newcommand{\Lra}{\Leftrightarrow}
\newcommand{\bpro}{\begin{proof}}
\newcommand{\epro}{\end{proof}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\bthe}{\begin{theorem}}
\newcommand{\ethe}{\end{theorem}}
\newcommand{\blank}[1]{\underline{\hspace{#1in}}}
\newcommand{\undr}{\underline}
\newcommand{\tb}{\textbf}
\newcommand{\ser}{\d\sum^{\infty}}


%\newcolumntype{M}{>{$}c<{$}}



\begin{document}

\title{MTH 1420, Spring 2012\\Dr. Graham-Squire}
\author{Lab 10: When does a function have a Taylor series? }
\date{}
\maketitle

\tb{Name}: \blank{3}



\section{Instructions}

 Your group should write up and turn in \underline{one} completed lab at the start of the next lab period.  You can use this sheet as a cover sheet for the lab you turn in.  \tb{Each member of the group should write up at least part of the lab}, but you should check each other's work since everyone in the group gets the same score.  

\section{Introduction}

In class we have looked at certain functions and their Taylor series, and we have assumed that those functions have a Taylor series.  However, not all functions will have a Taylor series representation, so in this lab we will discuss what needs to happen in order to show that a function does, in fact, have a Taylor series representation at a given point.

\section{Taylor polynomials and remainders}

  Suppose you are given a function $f$ and it has derivatives of all orders (that is, $f^{(n)}(x)$ is defined for all positive integers $n$) for a certain values $x=a$.  When is 
  \[ f(x)=\ser_{n=0} \frac{f^{(n)}(a)}{n!}(x-a)^n ?
  \]
First, let's look at the Taylor series
\[ \ser_{n=0} \frac{f^{(n)}(a)}{n!}(x-a)^n=f(a)+\frac{f'(a)}{1}(x-a)+\frac{f''(a)}{2}(x-a)^2+\dots+\frac{f^{(n)}(a)}{n!}(x-a)^n+\frac{f^{(n+1)}(a)}{(n+1)!}(x-a)^{n+1}+\dots
\]

\bdef
	Let $$f(a)+\frac{f'(a)}{1}(x-a)+\frac{f''(a)}{2}(x-a)^2+\dots+\frac{f^{(n)}(a)}{n!}(x-a)^n=T_n(x)$$ be the \undr{$n$th degree Taylor polynomial of $f$ at $a$} and  $$R_n(x)= \frac{f^{(n+1)}(a)}{(n+1)!}(x-a)^{n+1}+\frac{f^{(n+2)}(a)}{(n+2)!}(x-a)^{n+2}+\dots$$be the \undr{remainder at $n$} of the Taylor series.
\edefi

\bexe
	Write the Taylor series $\ser_{n=0} \frac{f^{(n)}(a)}{n!}(x-a)^n$ in terms of $T_n(x)$ and $R_n(x)$.
\eexe

\section{When a Taylor series equals a function}

We have the following Theorem:

\bthe\label{thm}
	If $\d\lim_{n\to \infty} R_n(x)=0$, then the function $f$ is equal to its Taylor series within the interval of convergence.
\ethe
  
Unfortunately, calculating that limit can be rather difficult, so we usually use an approximation to make it easier.  Namely:

\bthe(Taylor's inequality)
	If $f^{n+1}(x)\leq M$ for $|x-a|<d$, then the remainder $R_n(x)$ of the Taylor series satisfies the inequality
	\[ |R_n(x)|\leq \frac{M}{(n+1)!}|x-a|^{n+1} \hspace{.3in} \textup{ for } |x-a|\leq d 
	\]
\ethe

Taylor's inequality is helpful, because if it holds then we know that $\d\lim_{n\to \infty} R_n(x)=0$.

\bexe
	 Calculate $\d\lim_{n\to \infty}  \frac{M}{(n+1)!}|x-a|^{n+1}$ and use it (and Taylor's inequality) to explain why $\d\lim_{n\to \infty} R_n(x)=0$. (It may be hard to prove that limit mathematically, but you can use this trick to do it:  Consider the \undr{series} $\ser_{n=0} \frac{M}{(n+1)!}|x-a|^{n+1}$.  Use the ratio test to show that the series converges.  If a series converges, then the terms of the series must go to zero as $n$ goes to infinity, thus proving what you want.)

\eexe

We will now use this to prove that the Maclaurin series $\cos x=\ser_{n=0}(-1)^n\frac{x^{2n}}{(2n)!}$ we found in class actually represents that function.  What we need to prove is that $\d\lim_{n\to \infty}R_n(x)=0$.  We will use Taylor's inequality to do it, so our first step is to find an appropriate value for $M$.

\bexe
	Find a number $M$ such that $|f^{(n)}(x)|\leq M$ for all values of $x$ and all positive integers $n$, where $f(x)=\cos x$.  (Hint: start taking derivatives of $\cos x$ and see if you can find an $M$ value that will be an upper bound for all of them.  You should choose the smallest $M$ possible.)
\eexe

\bexe
	Using Taylor's inequality we see that $$\lim_{n\to \infty} |R_n(x)|\leq \lim_{n\to \infty} \frac{M}{(n+1)!}|x-a|^{n+1}.$$
	Plug in your value for $M$ and explain why $\d\lim_{n\to \infty} \frac{M}{(n+1)!}|x-a|^{n+1}=0$. \eexe

According to Theorem \ref{thm}, you have just shown that $\cos x$ is equal to its Taylor series $\ser_{n=0}(-1)^n\frac{x^{2n}}{(2n)!}$ within the interval of convergence, which happens to be infinity.

\section{A function that does not have a Maclaurin series}

We will do some brief exploration of a function that does \undr{not} have a Maclaurin series.  Namely, consider the function 
$$f(x)=\begin{cases} e^{(-1/x^2)} & \mbox{ if }x\neq 0\\
				0 & \mbox{ if }x=0

\end{cases}$$

\bexe
	If $f(x)$ had a Maclaurin series, what would it look like (for all values of $x$ not equal to zero, at least).  (Hint: Use the Maclaurin series for $e^x$ and substitute something in for $x$.)
\eexe

\bexe
	Sketch a graph of $f(x)$ (Use a graphing calculator or sage and then copy it to your page).
\eexe

\bexe
	Use the definition of continuity ($\d\lim_{x\to a}f(x)=f(a)$) to explain/show that $f(x)$ is continuous at $x=0$ (Note: the graph is not enough explanation).
\eexe

\bexe
	Find $f'(x)$ and explain why it is defined. (Note:  to do this, you must explain why $\d\lim_{x\to 0} f'(x)=0$.  This may be difficult to prove, but you should at least justify it by plugging some $x$-values close to zero into $f'(x)$ and showing that they will in fact go to zero).
\eexe


\end{document} 